-
Notifications
You must be signed in to change notification settings - Fork 421
fix(idempotency): make idempotent_function decorator thread safe #1899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(idempotency): make idempotent_function decorator thread safe #1899
Conversation
|
4 similar comments
|
|
|
|
c60c23e
to
31158dd
Compare
error (must be from resource client -> low-level client):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @mploski! Another great job improving the Idempotency utility! I made some comments and I think we need to address them before starting a review to merge this.
Could you please check the comments and resolve them?
Thank you very much.
Codecov ReportBase: 97.52% // Head: 97.51% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #1899 +/- ##
===========================================
- Coverage 97.52% 97.51% -0.01%
===========================================
Files 143 143
Lines 6573 6570 -3
Branches 468 468
===========================================
- Hits 6410 6407 -3
Misses 128 128
Partials 35 35
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Hey @leandrodamascena, thx for looking into this :-) I fixed last pytest error and reverted back lines related to pytest tests grouping. Please re-review if you have some time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just made a suggestion to make the code more readable for other people. But I tested it locally and everything is working as expected. Tomorrow I will do another review and I think we are very close to a merger.
Thanks a lot @mploski, your codes always bring me great insights.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a slight change to the documentation. Thanks so much for the effort to make this utility even more resilient, @mploski!
If you don't have any considerations, we are ready to merge!
@leandrodamascena thanks for reviewing it! :-) Let's ship it |
@awslabs/aws-lambda-powertools-python No related issues found. Please ensure 'pending-release' label is applied before releasing. |
Issue number: #1718
Summary
PR modifies idempotency feature to make sure decorating user function with idempotency decorator is thread safe
Changes
PR modifies idempotency feature to use low level boto3 dynamodb client which is thread safe. It also adds other features/fixes as:
User experience
User experience stays the same, but user doesn't need to worry about thread safety
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.